#ifndef __OC_ServerDef_H__
#define __OC_ServerDef_H__

#if defined(_MSC_VER)
#ifndef OCServer_EXPORTS
#define _ServerExport  __declspec(dllimport)
#else
#define _ServerExport  __declspec(dllexport)
#endif
#else
#define _ServerExport
#endif

#include "trantor/utils/Logger.h"
#include "OCMain/StringUtil.h"

inline OCPP::String formatLogTime()
{
	OCPP::StringStream s;
	s << OCPP::StringUtil::getTime() << " " << std::this_thread::get_id();
	return s.str();
}

#ifdef LOG_INFO
#undef LOG_INFO
#endif
#define LOG_INFO                                                       \
    TRANTOR_IF_(trantor::Logger::logLevel() <= trantor::Logger::kInfo) \
    trantor::RawLogger().stream() << formatLogTime() << " INFO  "

namespace OCPP
{
	class Server;
	class ServerUtil;
	class SqliteFileManager;
	class MapManager;
	class MapCacher;
	class MapCacherWorkQueue;
	using MapCacherSet = std::map<String, std::shared_ptr<MapCacher> >;
}

namespace drogon
{
	namespace orm
	{
		class DbClient;
	}
}

#endif